//
//  SYTitleLable.m
//  MicroNews
//
//  Created by tongcheng on 15/10/20.
//  Copyright © 2015年 siyue. All rights reserved.
//

#import "SYTitleLable.h"

@implementation SYTitleLable

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        self.textAlignment = NSTextAlignmentCenter;
        self.font = [UIFont systemFontOfSize:14]; //默认大小
        self.scale = (0)/255.0; //
    }
    return self;
}

/** 通过scale的改变改变多种参数 */
-(void)setScale:(CGFloat)scale
{
    _scale = scale;
    // 0.8 0.6 0.6
//    self.textColor = [UIColor colorWithRed:scale green:scale blue:scale alpha:1];
    self.textColor = [UIColor whiteColor];
    CGFloat minScale = (200)/255.0; //0.6 控制缩放
    CGFloat trueScale = minScale + (1-minScale)*scale;
    self.transform = CGAffineTransformMakeScale(trueScale, trueScale); //缩放
}

@end
